Skip to content

feat(discord): Discord bot - #80

Draft
patroza wants to merge 16 commits into
fork/changesfrom
fork/discord
Draft

feat(discord): Discord bot#80
patroza wants to merge 16 commits into
fork/changesfrom
fork/discord

Conversation

@patroza

@patroza patroza commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Managed integration overlay

Role Value
Base fork/changes
Head fork/discord
Composition After desktop links (#10), before VS Code (#79)
Deployment scope Discord bot

This one-commit overlay owns the complete end-to-end Discord integration:

  • bot runtime and focused tests
  • Discord/T3 bridge, steering, and presentation behavior
  • operator-facing Discord documentation and examples

This PR intentionally remains open and draft. Do not merge it. Update fork/discord directly,
or start a reviewable child PR with:

pnpm fork:stack overlay-start 80 <branch>

The stack workflow rebases this branch and composes it into fork/integration.

@patroza patroza added the OVERLAY Long-lived draft overlay composed into fork/integration; do not merge directly. label Jul 26, 2026
@patroza patroza changed the title feat(discord): own the Discord integration overlay feat(discord): Discord Bot Jul 26, 2026
@patroza
patroza force-pushed the fork/changes branch 2 times, most recently from 79176b5 to d526bc4 Compare July 26, 2026 08:56
@patroza patroza changed the title feat(discord): Discord Bot feat(discord): Discord bot Jul 26, 2026
@patroza
patroza force-pushed the fork/discord branch 3 times, most recently from 70cf79c to e817ff5 Compare July 26, 2026 10:37
@patroza
patroza force-pushed the fork/discord branch 9 times, most recently from acf4763 to b578fce Compare July 26, 2026 17:45
@patroza
patroza force-pushed the fork/discord branch 2 times, most recently from 452dcd5 to 7fc61e2 Compare July 26, 2026 19:19
@patroza
patroza force-pushed the fork/discord branch 5 times, most recently from e9b7693 to 3967e90 Compare July 28, 2026 08:44
@patroza
patroza force-pushed the fork/discord branch 3 times, most recently from fadef3e to 367d3c2 Compare July 28, 2026 11:17
patroza and others added 16 commits July 28, 2026 23:19
…och (#100)

When a queued follow-up starts, Discord clears the live tip for a new
Working ack. If the prior turn's real answer only lived in that tip, it
vanished. Promote substantial tip body to a durable final first.

Pairs with server turnId rebind fix for the same race.
…ue (#112)

steernow was reporting "Nothing is queued" whenever the HTTP thread
snapshot was missing or lagging, even when Discord still had parked
follow-ups in the in-memory registry. Prefer the server queue, fall back
to the local registry, register failed mid-turn steers for later flush,
and clarify the empty-queue reply so users know to use /agent steer.

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
… queue (#114)

connectPrepared's parameter was named httpBaseUrl, so the assignment that
should record the connected base URL only mutated the parameter. Outer
connection state stayed null, fetchThreadDetail always short-circuited, and
/agent steernow reported "thread snapshot unavailable" while WS steering
from desktop still worked.

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
dfx 1.0.14 calls Schedule.either (removed in effect 4.0.0-beta.102).
…120)

Load an operator-maintained identity map (T3_IDENTITY_MAP_PATH) and inject
resolved Co-authored-by trailers for the thread starter and current requester
on every Discord turn so agents can attribute commits without inventing emails.

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
…footer (#134)

* feat(discord-bot): reload identity map with 60s TTL cache

Re-read T3_IDENTITY_MAP_PATH on access after a one-minute cache so operators
can add Discord→GitHub entries without restarting the bot. Keep the last good
map if a reload fails.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* feat(discord-bot): sort current-project PRs first on thread pin

In the pinned thread-info PR list, show PRs for the channel/project GitHub
repo above cross-repo links. Preserve first-seen order within each group.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* feat(discord-bot): hardcode Discord PR attribution from thread starter

When a PR URL is observed on a Discord-linked thread, append the
attribution footer via gh (thread starter + thread title) without
relying on agent AGENTS.md prompts. Idempotent if already present.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* fix(discord): require commit co-authors and hardcode PR Discord footer

AGENTS.md and identity-map turn prompts now mark Co-authored-by trailers and
the Discord PR description footer as required. Cherry-pick bot-side hard
append of the Discord footer when PR URLs are linked so AGENTS-only guidance
is not the only path.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

---------

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
* fix(discord): preserve complete alert traces

Split oversized ops alerts into ordered Discord-safe messages instead of truncating fatal and bridge details. Add focused coverage proving long session-error stacks survive delivery intact.

* fix(discord): attach complete alert traces

Send fatal, bridge, and T3 session traces as text-file attachments through the existing native multipart upload path. Keep alert messages concise and preserve complete causes by default.

Co-authored-by: Enrico Polanski <16064771+enricopolanski@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* fix(discord): satisfy overlay checks

Co-authored-by: Enrico Polanski <16064771+enricopolanski@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

---------

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Enrico Polanski <16064771+enricopolanski@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
…kups (#137)

Boot used a single connect attempt and could mark the session ready before the
shell snapshot arrived, so mentions after a restart looked like missing projects
and stayed broken until a manual bot restart. Retry connect until shell-ready,
tear down partial sessions, force reconnect on transport errors, and surface a
transient "still connecting" message instead of a false alias/path failure.

Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
…Rs (#146)

Add `/omegent assign` (alias `/agent assign`) to assign linked GitHub PRs
on a Discord thread to the invoker (identity map) or an explicit GitHub
login. Document that Discord agents must always open a PR (draft until
full lint/typecheck/tests/vp check) in turn meta, AGENTS.md, and docs.

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
…ters (#147)

* docs(discord): never @mention co-authors in PR bodies

Credit stays on commit Co-authored-by trailers only so listing people in
the PR description does not notify them.

Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* docs(discord): allow linked @Handles for co-authors, ban bare mentions

PR body may list co-authors as profile links that look like mentions
([@login](https://github.com/login)); bare @login is still forbidden
because it notifies people. Commit trailers remain the credit source.

Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* docs(discord): draft PRs must be marked ready after local gates

A draft is tracking only — after focused tests and vp check, convert to
ready for review. Leaving drafts abandoned is incomplete handoff.

Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* docs(discord): turn meta requires draft → ready follow-through

Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* fix(discord-bot): real Discord profile + thread URLs in PR footers

Use https://discord.com/users/<id> for the opener link (not bare
snowflakes) and require full channel jump URLs. Inject a ready-to-paste
footer into every Discord turn prompt. Agent docs require draft→ready
follow-through after local gates.

Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

---------

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Joshua Dimaunahan <170177550+MindfulLearner@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
Remove the remaining 300-character slice from the watchdog database query so text attachments receive the complete persisted stack trace. Add a SQLite-backed regression test.

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Enrico Polanski <16064771+enricopolanski@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
* Add multi-platform chat adapter plan

* feat(discord-bot): port Teams intake module + message-action plan

Rebase the chat-platform adapter plan onto current fork/discord and fold in
the other Teams work from the legacy private repo:

- aaaomega/t3code-pvt#1 — Graph-based Teams intake (poll → Discord/T3)
- aaaomega/t3code-pvt#6 — Teams message-action planning doc

Wire optional TEAMS_* config, sourceKind/sourceThreadId link keys, shared
LinkedTurnRouter start/continue helper, and docs cross-links. Teams stays
off unless TEAMS_ENABLED=1.

* feat(teams): add native Discord-free T3 bridge

* feat(teams): surface pending T3 interactions

---------

Co-authored-by: t3 agent <patroza@users.noreply.github.com>
Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OVERLAY Long-lived draft overlay composed into fork/integration; do not merge directly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant